<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::get('home/index', 'HomeController@index');
Route::post('home/add_free', 'HomeController@addFree');
Route::get('news/lists', 'NewsController@lists');
Route::get('news/detail', 'NewsController@detail');
Route::post('user/save_user', 'UserController@saveUser');
Route::post('user/auth', 'UserController@auth');
Route::get('user/get_user', 'UserController@getUser');
Route::get('user/my_like', 'UserController@myLike');
Route::post('news/add_num', 'NewsController@addNum');
Route::post('user/is_prize', 'UserController@isPrize');
Route::get('user/prize_lists', 'UserController@PrizeLists');

Route::get('news/welfare_lists', 'NewsController@welfare_lists');
Route::get('news/welfare_info', 'NewsController@welfare_info');

Route::get('trip/banner', 'TripController@banners');
Route::get('trip/search', 'TripController@search');
Route::get('trip/category', 'TripController@category');
Route::get('trip/lists', 'TripController@lists');
Route::post('trip/add', 'TripController@add');
Route::post('user/login', 'UserController@login');
Route::post('user/edit_user', 'UserController@editUser');
Route::post('trip/edit', 'TripController@edit');
Route::post('trip/del', 'TripController@del');
Route::get('trip/detail', 'TripController@detail');
Route::get('user/my_trip', 'UserController@myTrip');


